import request from "@/utils/request.ts"
import type { PageModelResult } from '@/api/model/pageParam.ts';
import type { ResultModel } from '@/api/model/ResultModel.ts';
import type { ShopManagerModel } from '@/api/model/ShopManager.ts';
import type { commonStatus } from '@/api/model/CommonStatus.ts';
// 条件分页查询
export const queryShopManagerListApi = (username : string, realName : string, lastLoginTime : string, status : string, page : number, pageSize : number) =>
	request.get<any, PageModelResult>(`/shopManager?username=${username}&realName=${realName}&lastLoginTime=${lastLoginTime}&status=${status}&page=${page}&pageSize=${pageSize}`)


// 新增管理用户
export const addShopManagerApi = (ShopManager : ShopManagerModel) => request.post<any, ResultModel>('/shopManager', ShopManager)

// 编辑管理(步骤一：回显)
export const getByIdShopManagerApi = (id : number) => request.get<any, ResultModel>(`/shopManager/${id}`)


// 编辑管理(步骤二：更新管理信息)
export const updateShopManagerApi = (ShopManager : ShopManagerModel) => request.put<any, ResultModel>('/shopManager', ShopManager)


// 删除用户（批量删除）
export const deleteShopManagerApi = (ids : string) => request.delete<any, ResultModel>(`/shopManager?ids=${ids}`)

// 修改用户状态（批量）

export const disableShopManagerApi = (adminStatus : commonStatus) => request.put<any, ResultModel>('/shopManager/status', adminStatus)